| Conditions | 4 |
| Paths | 4 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | // utilities |
||
| 17 | export const clickNode = function (node) { |
||
| 18 | if (document.createEvent) { |
||
| 19 | let evt = document.createEvent('MouseEvents'); |
||
| 20 | evt.initEvent('click', true, false); |
||
| 21 | node.dispatchEvent(evt); |
||
| 22 | } else if (document.createEventObject) { |
||
| 23 | node.fireEvent('onclick'); |
||
| 24 | } else if (typeof node.onclick === 'function') { |
||
| 25 | node.onclick(); |
||
| 26 | } |
||
| 27 | } |
||
| 28 | |||
| 40 | } |